package com.es.service.impl;

import com.es.SqlSessionUtils;
import com.es.entity.Student;
import com.es.mapper.StudentMapper;
import com.es.service.StudentService;

import java.io.Serializable;
import java.util.List;

/**
 * 描述:
 * MyBatis-
 *
 * @author Derek
 * 创建时间：2022-05-07 10:27
 */
public class StudentServiceImpl implements StudentService {
    StudentMapper mapper = SqlSessionUtils.getSqlSession().getMapper(StudentMapper.class);
    @Override
    public int save(Student student) {
        return mapper.save(student);
    }

    @Override
    public int update(Student student) {
        return mapper.update(student);
    }

    @Override
    public int delete(Serializable id) {
        return mapper.delete(id);
    }

    @Override
    public List<Student> list() {
        return mapper.list();
    }

    @Override
    public List<Student> listByName(String name) {
        return mapper.listByName(name);
    }

    @Override
    public Student get(Serializable id) {
        return mapper.get(id);
    }
}
